home *** CD-ROM | disk | FTP | other *** search
/ Bride Wars Press Kit / Bride Wars DPK.iso / pc / resources / functions / pdfLaunch.exe / pdfLaunch.dxr / 00003_pdf Launcher.ls < prev    next >
Encoding:
Text File  |  2007-02-26  |  584 b   |  31 lines

  1. global gbPC, wnd
  2.  
  3. on prepareMovie
  4.   startTimer()
  5.   gbPC = the platform contains "win"
  6. end
  7.  
  8. on PDFLaunch me, flashstring
  9.   if gbPC then
  10.     importFileInto(member("path"), _movie.path & "path.txt")
  11.     filePath = member("path").text & "Documents\" & flashstring
  12.   else
  13.     filePath = _movie.path & "Documents:" & flashstring
  14.   end if
  15.   put filePath
  16.   baOpenFile(filePath, "normal")
  17.   wnd = baNextActiveWindow(0)
  18.   put wnd
  19.   bringFront()
  20. end
  21.  
  22. on bringFront me
  23.   put wnd
  24.   if baWindowExists(wnd) then
  25.     Ok = baActivateWindow(wnd)
  26.     _player.quit()
  27.   else
  28.     bringFront()
  29.   end if
  30. end
  31.